home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / DTinfo / DT6.2port.txt < prev    next >
Text File  |  1996-11-11  |  38KB  |  905 lines

  1.  
  2.            What We Did to Port the Developer Toolbox to IRIX 6.2
  3.  
  4.                  and, What We Learned About In The Process
  5.  
  6.                                  Chapter 1
  7.  
  8.         -------------------------------------------------------------
  9.  
  10.      This document is a record of everything we did to upgrade and then
  11.       re-compile the DT on IRIX 6.2 with the "bare-bones" o32 option.
  12.  
  13.                              Table of Contents
  14.  
  15.                       1. Upgrading the DT machine
  16.                       2. The Challenge of n32
  17.                       3. o32 and n32 Pointers
  18.                          References
  19.                       4. What DT Source Code Changed
  20.                             o Major Upgrades
  21.                             o Minor Upgrades
  22.                             o Included But Not Ported to IRIX 6.2
  23.                             o NOTES
  24.  
  25.    The reason this is "Chapter 1" is because we have not yet succeeded in
  26.    cleaning up DT source code so it is n32 capable. By so doing, one can
  27.    attain full access to 64-bit wide integer registers and 64-bit 
  28.    instructions in a 32-bit address space. It is the janitor's 
  29.    understanding that achieving such n32 "code robustness" is the 
  30.    developer's most basic and significant undertaking in moving to IRIX 
  31.    6.2 from an IRIX 5 universe. Some of the relevant details about this 
  32.    are described in section 2, The Challenge of n32.
  33.  
  34.         -------------------------------------------------------------
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                           Upgrading the DT machine
  41.                    --------------------------------------
  42.  
  43.  
  44. The toolbox source, build, test and SGI-internal-website machine, named
  45. dtdustbin and aliased as "swank", is an IP19 6-processor Challenge-L system.
  46. In May, we upgraded swank from IRIX 5.3 to 6.2, changing the 2GB system disk
  47. to be an xfs filesystem in the process. Since the IP19 is 64-bit, we went
  48. thru the kernel upgrade from 32-bit without a hitch. We chose to switch our
  49. system to be xfs in anticipation of taking advantage in the future of
  50. creating a single LARGE "filesystem" by combining our series of 4-GIG disks
  51. to operate as a single partition. Prior to re-compiling the DT, we pass on a
  52. few tidbits of what we learned while upgrading swank.
  53.  
  54.   1. Choose "delay resolving conflicts" when inst'ing the "IRIX 6.2TM (Part
  55.      1 of 2)" CD
  56.  
  57.         documentation on this issue is not revealing itself so, from memory,
  58.      this is the best that can be provided here: in upgrading to IRIX 6.2
  59.      with the two CDs labeled, "IRIX 6.2TM (Part 1 of 2)" and "IRIX 6.2TM
  60.      (Part 2 of 2)", once you have made all the selections you want on the
  61.      first (Part 1 of 2) CD, somewhere before or after typing "go" at the
  62.      Inst> prompt, one is presented with two choices that say something
  63.      like:
  64.  
  65.        1. resolve conflicts now
  66.        2. delay resolving conflicts
  67.  
  68.      DON'T FALL INTO THE TRAP the silly janitor did of selecting number 1.
  69.      never having seen this before, he was not aware of the fact that there
  70.      would be a barrage of conflicts that would not be resolved since one
  71.      needs to install BOTH Parts 1 AND 2 before outstanding conflicts are
  72.      resolved. The alternative to selecting number 2 above is to turn the
  73.      delay_conflicts Inst Preference to "on". Stepping into Inst and typing
  74.      the command
  75.  
  76.           Inst> set delay_conflicts
  77.  
  78.      reveals such information as "Controls when certain "delayable"
  79.      conflicts are presented to the user. . . . In some installation
  80.      scenarios, the conflict will have to be delayed since the subsystem(s)
  81.      necessary to resolve the conflict are not on the current distribution.
  82.      . . . An `on' value will always present the delayable conflicts prior
  83.      to exiting." This is precisely the case when the baseline eoe
  84.      distribution spans 2 CDs as it does for IRIX 6.2. See "IRIX 6.2
  85.      Instructions for Customers Updating From Earlier IRIX Releases"
  86.      (toolbox/documents/irix6.2/6.2errata.ps.Z), for more information.
  87.  
  88.      If for some reason you find yourself forced to take choice number 1,
  89.      remember that all the defaults you had for any selected products that
  90.      end up being removed are lost, so be sure to scan the choices
  91.      carefully. In particular, do NOT do "keep N," or the system will be
  92.      barely, or not at all, usable.
  93.  
  94.      For a listing of what products exist on the IRIX 6.2TM (Part 1 of 2)
  95.      CD, see the section by the same name in the "IRIX 6.2 for System and 
  96.      Network Administrators" Pipeline article. Likewise for IRIX 6.2TM (Part
  97.      2 of 2).
  98.  
  99.   2. 6.2 depends on IL 2.5.1 -- DON'T attempt to load/use IL 3.0 on IRIX 6.2
  100.  
  101.         the janitor learned from one of the Image Library (IL) gauds in
  102.      engineering that IRIX 6.2 depends on IL 2.5.1. he had mistakenly
  103.      updated to IL 3.0 since that version was what existed in the 6.2/all
  104.      directory of inst images on the SGI internal dist machine. with IL 3.0,
  105.      applications like toolbox/src/ibrowse and
  106.      toolbox/src/exampleCode/movies/cineswipe/libcineswipe failed to
  107.      compile, producing Errors of the kind,
  108.  
  109.           #error     This header file is obsolete, use <ifl/iflSize.h> or
  110.           define IL2_5_COMPAT
  111.  
  112.      -- but even defining IL2_5_COMPAT in the Makefile did not resolve the
  113.      errors. that's when we learned that 3.0 is not the IL meant to be used
  114.      with IRIX 6.2. we got back on track by doing a
  115.  
  116.           versions remove il_eoe il_dev
  117.  
  118.      as root, and then installing the 2.5.1 version. after this, everything
  119.      once again worked without any barking from the compiler.
  120.  
  121.   3. one only needs 4 subsystems from the 2.0.1 performer_dev.sw image
  122.  
  123.         the janitor learned from one of the Performer gauds in engineering
  124.      that of the performer_dev.sw image, the only subsystems needed to do
  125.      basic compilations of performer code are:
  126.        1. performer_dev.sw.hdr
  127.        2. performer_dev.sw.common_performer
  128.        3. performer_dev.sw.ogl_performer
  129.        4. performer_dev.sw.igl_performer
  130.  
  131.  
  132.  
  133.                             The Challenge of n32
  134.                        -------------------------------
  135.  
  136.  
  137. Prior to creating the necessary porting environment by explicitly specifying
  138. the /usr/lib32 n32 library location (see N32 Porting Guidelines from the
  139. MIPSpro(TM) N32 ABI Handbook), the janitor faces the fact that a great deal
  140. of code currently resident on the DT needs loads of ANSI "polish" applied to
  141. it before it is ready for the successful jump to n32.
  142.  
  143. We did perform one "trial pass" of the toolbox/src subtree with -n32
  144. activated. To do this we conferred with the make/commondefs/commonrules gaud
  145. in engineering who explained how to modify the IRIX 6.2 version of the
  146. /usr/include/make/releasedefs file (installed from the eoe.hdr.lib
  147. subsystem) so that instead of definining
  148.  
  149.      DEF_CSTYLE=$(CSTYLE_32_M2)
  150.      DEF_GLDOPTS=$(GLDOPTS_32_M2)
  151.  
  152.      . . .
  153.  
  154.      DEF_OBJECT_STYLE=32_M2
  155.      DEF_32_OBJECT_STYLE=32_M2
  156.  
  157. we switched these to be
  158.  
  159.      DEF_CSTYLE=$(CSTYLE_N32_M3)
  160.      DEF_GLDOPTS=$(GLDOPTS_N32_M3)
  161.  
  162.      . . .
  163.  
  164.      DEF_OBJECT_STYLE=N32_M3
  165.      DEF_32_OBJECT_STYLE=N32_M3
  166.  
  167. By doing this, we witnessed the IRIX 6.2 o32 "default compiler settings" --
  168. using -mips2 -o32 compile lines of the form,
  169.  
  170. //usr/bin/cc -fullwarn -I..//include -c -nostdinc -I//usr/include -mips2
  171. -o32 -O -MDupdate Makedepend -woff
  172. 1685,515,608,658,799,803,852,1048,1233,1499 -c axes.c
  173.  
  174. -- change to employ the -mips3 -n32 flag:
  175.  
  176. //usr/bin/cc -fullwarn -I..//include -c -nostdinc -I//usr/include -mips3
  177. -n32 -O -MDupdate Makedepend -woff
  178. 1685,515,608,658,799,803,852,1048,1233,1499 -c axes.c
  179.  
  180. The results of this trial pass (running make -i >& makeLog to continue
  181. compilation past fatal errors) produced many errors which, under the o32
  182. libraries did not even show up as warnings. One way of measuring the
  183. differing results of o32 and n32 in the toolbox/src subtree is that the
  184. files generated by redirecting STDOUT/STDERR were orders of magnitude
  185. different in size:
  186.  
  187.    * "makeLogO32.txt" 12401 lines, 781123 characters
  188.    * "makeLogN32.txt" 271894 lines, 8644807 characters
  189.  
  190. From this, we are looking at pursuing two parallel tracks in order to start
  191. providing n32-compiled binaries-from-DT-source come this fall:
  192.  
  193.   1. Begin polishing selected programs in the current DT tree
  194.   2. Begin integrating new content that already compiles cleanly using n32
  195.  
  196. From 1 above, the requisite "polish" to create n32-compilable source will
  197. include such areas of attention as
  198.  
  199.   1. resolving all errors produced by -fullwarn option of the kind
  200.         o catastrophic error(1005): could not open source file "____"
  201.         o error(1020): identifier "____" is undefined
  202.         o error(1028): expression must have a constant value
  203.         o error(1040): expected an identifier
  204.         o error(1080): a storage class may not be specified here
  205.         o error(1084): invalid combination of type specifiers
  206.         o error(1118): cast to type "Matrix" is not allowed
  207.         o error(1119): return value type does not match the function type
  208.         o error(1164): argument of type "____" is incompatible with
  209.           parameter of type "____"
  210.         o error(1140): a value of type "____" cannot be used to initialize
  211.           an entity of type "____"
  212.         o error(1143): declaration is incompatible with
  213.         o error(1153): declaration is incompatible with previous "____"
  214.         o error(1238): member "____" is inaccessible
  215.         o error(1250): invalid ____ declaration
  216.         o error(1278): no instance of overloaded function
  217.         o error(1287): const or volatile qualifier on this function is not
  218.           allowed . . .
  219.         o error(1332): base class name required -- "____" assumed
  220.         o error(1361): delete array size expression ignored
  221.         o error(1515): a value of type "____" cannot be assigned to an
  222.           entity of type "____"
  223.         o error(1563): expression must have pointer-to-class type
  224.  
  225.   2. using function prototypes where they currently aren't being defined.
  226.      It is critically important to be aware of this: some programs won't
  227.      work correctly -- even if they compile -- if they don't have the
  228.      prototypes in force, particular for varargs and math routines, but not
  229.      restricted to those. Quoting from a relevant segment of the Native
  230.      64-Bit (N64) and N32 Subprogram Interface for MIPS Architectures
  231.      section of Chapter 2: Calling Convention Implementations of the the
  232.      MIPSpro(TM) N32 ABI Handbook:
  233.  
  234.         o Whenever possible, floating point arguments are passed in floating
  235.           point registers regardless of whether they are preceded by integer
  236.           parameters. [The 32-bit ABI allows only leading floating point
  237.           (FP) arguments to be passed in FP registers; those coming after
  238.           integer registers must be moved to integer registers.]
  239.         o Variable argument routines require an exception to the previous
  240.           rule. Any floating point parameters in the variable part of the
  241.           argument list (leading or otherwise) are passed in integer
  242.           registers. Several important cases are involved:
  243.              + If a varargs prototype (or the actual definition of the
  244.                callee) is available to the caller, it places floating point
  245.                parameters directly in the integer register required, and no
  246.                problems occur.
  247.              + If no prototype is available to the caller for a direct call,
  248.                the caller's parameter profile is provided in the object file
  249.                (as are all global subprogram formal parameter profiles), and
  250.                the linker (ld/rld) generates an error message if the linked
  251.                entry point turns out to be a varargs routine.
  252.                Note: If you add -TENV:varargs_prototypes=off to the
  253.                compilation command line, the floating point parameters
  254.                appear in both floating point registers and integer
  255.                registers. This decreases the performance of not only varargs
  256.                routines with floating point parameters, but also of any
  257.                unprototyped routines that pass floating point parameters.
  258.                The program compiles and executes correctly; however, a
  259.                warning message about unprototyped varargs routines still is
  260.                present.
  261.              + If no prototype is available to the caller for an indirect
  262.                call (that is, via a function pointer), the caller assumes
  263.                that the callee is not a varargs routine and places floating
  264.                point parameters in floating point registers (if the callee
  265.                is varargs, it is not ANSI-conformant).
  266.  
  267.   3. as time permits, resolving the massive amount of warning messages.
  268.      Some of these warnings are due to SGI's header files (particularly
  269.      those from the X and motif consortiums) not being truly ANSI-clean.
  270.      Disabling those warnings with -woff gets rid of much of the "noise" at
  271.      the cost of perhaps missing some potential problems in your own code.
  272.      The janitor hopes you understand and appreciate the value and benefit
  273.      running "make -i" is providing us in the errors the new compilers found
  274.      in the DT code and that the "noise" produced is justified in that it
  275.      finds real problems.
  276.  
  277.      Also recommended is employment of the compiler option -diag_error --
  278.      "The messages with the specified numbers are treated as errors. In
  279.      particular, if any such message is reported, no object file will be
  280.      generated" -- which can make specific warnings fatal, to ensure you
  281.      don't get sloppy once you have clean things up (engineering groups
  282.      inside SGI have done this on the kernel, and some other parts of the
  283.      system). The process of cleaning up one's code often does find real and
  284.      sometimes longstanding bugs.
  285.  
  286. Obviously number 3 is a laudable goal, but in the actual, pragmatic world,
  287. will get short shrift with the passage of time. To compensate for this, we
  288. are also honing our information ferreting teeth for this fall, so that once
  289. we have completed spinning the v6.1 DT, we can actively begin to identify,
  290. locate, qualify, and integrate source that passes the "n32 compatibility
  291. test" with flying colors. After the release of v6.1 we will begin creation
  292. and population of an "N32-compliant apps on the DT" web page (initially it
  293. will show up in the NEW page, and, i'm sure, end up on the HOT page as well
  294. as in all the appropriate global (topical, A-Z Documents) file listings).
  295.  
  296. As an aside, for those who would like to know what commands are n32 on IRIX
  297. 6.2, look for the following output from file(1):
  298.  
  299.      /bin/sh:       ELF N32 MSB mips-3 executable MIPS - version 1
  300.  
  301. Other "n32 graduates" include: csh, ksh, and rqs32.
  302.  
  303.  
  304.  
  305.                             o32 and n32 Pointers
  306.                        -------------------------------
  307.  
  308.  
  309. To be precise:  Our Goal in all this is the following:
  310.  
  311.      If you support R4000 platforms on IRIX 6.X, you will want to
  312.      compile
  313.  
  314.           -n32 -mips3.
  315.  
  316.      This gives you the compiler improvements of newer compiler
  317.      optimization technology without converting your pointers to
  318.      64-bit.
  319.  
  320.      If you are supporting mips4 platforms and want to tune for those
  321.      systems, then compile
  322.  
  323.           -mips4   [-64]
  324.  
  325.      (if you have checked your code for 64-bitness add -64). This will
  326.      limit the systems that can run -mips4 (R4000 is mips3) but should
  327.      give your code a boost.
  328.  
  329. For some of the salient information on the o32 and n32 ABI implementations
  330. in IRIX 6.2, see
  331.  
  332.    * Preparing for IRIX 6.2 & 64-bit, A Nutshell view and series of pointers
  333.    * The Next Generation of Compiler Technology, Developer News, 5/96
  334.    * Accessing 64-bit CPU Power with 32-bit Software, Developer News, 5/96
  335.    * ABI Attribute Summary the o32 and n32/64-bit ABI implementations.[1]
  336.    * Example Application illustrates steps necessary to port from o32 to 
  337.      n32.[2]
  338.    * N32 Porting Guidelines -- steps necessary to port IRIX 5.x 32-bit apps to 
  339.      n32. [3]
  340.    * What is N32? -- describes the n32 ABI and compares it with the other
  341.      MIPS ABIs. [4]
  342.    * The Compiler Information section from the Welcome to IRIX 6.2 document
  343.    * IRIX 6.2 Application Binary Options from IRIX 6.2 Technical Report
  344.  
  345.    * Obsoleted Hardware
  346.      IRIX 6.2 does not support the following systems and peripherals:
  347.         o R2000/R3000 systems
  348.         o GTX graphics on a Crimson system
  349.         o IPI, SMD, and ESDI disk drives
  350.         o Xylogics (XM) 1/2 Inch tape drives
  351.         o Ikon Board
  352.         o svideo option on Indigo
  353.  
  354. _________________________
  355. References
  356.  
  357.   1. MIPSpro(TM) N32 ABI Handbook, Chapter 2: Calling Convention
  358.      Implementations
  359.  
  360.   2. Ibid, Chapter 4: N32 Examples and Case Studies
  361.  
  362.   3. Ibid, Chapter 3: N32 Compatibility, Porting, and Assembly Language
  363.      Programming Issues
  364.  
  365.   4. Ibid, Contents of This Guide
  366.  
  367.  
  368.  
  369.  
  370.                         What DT Source Code Changed
  371.                  ------------------------------------------
  372.  
  373.  
  374. MAJOR UPGRADES:
  375. -----------------------------------------------------------
  376.  
  377.    * toolbox/src/tutorials/custEducation/opengl1/
  378.    * toolbox/src/tutorials/custEducation/opengl2/
  379.           Major changes/shuffles -- see
  380.           toolbox/src/tutorials/custEducation/opengl1/Release_Notes and
  381.           opengl2/Release_Notes for more details -- use of libaux and libtk
  382.           has been replaced with a new utility toolkit, liboglprog so the
  383.           below directory name changes do NOT adequately reflect the changes
  384.           occuring within all other directories whose names haven't changed.
  385.  
  386.           opengl1:
  387.                DELETED:
  388.                     demos/OGLPG{/libaux,/libtk}/
  389.                     demos/Mixed_Model/
  390.                     examples/antialiasing/
  391.                     examples/input/
  392.                     examples/light_properties/
  393.                ADDED:
  394.                     examples/dlists/
  395.           opengl2:
  396.                DELETED:
  397.                     examples/clipping/
  398.                     examples/dlists/
  399.                     examples/extensions/
  400.                     examples/re_extensions/
  401.                     librgb/
  402.                ADDED:
  403.                     demos/Tutorials/
  404.                     examples/adv_texture/
  405.                     examples/clipplanes/
  406.                     examples/image_extensions/
  407.                     examples/sgi_extensions/
  408.                RENAMED:
  409.                     examples/raster/ --> examples/rasterops/
  410.                     examples/stencils/ --> examples/stencil/
  411.                     labs/raster/ --> labs/rasterops/
  412.  
  413.  
  414.  
  415. MINOR UPGRADES:
  416. -----------------------------------------------------------
  417.  
  418.    * toolbox/public/TIFF/tools/
  419.           Removed archaic _s from -lgl and -lc in Makefile, Makefile.sgi,
  420.           Makefile.aix, and Makefile.sco, since there are no longer even the
  421.           stubs (as there was in IRIX 5) for "shared libraries" in IRIX 6
  422.           which used to exist in IRIX 4 (e.g. -lgl_s).
  423.  
  424.  
  425.    * toolbox/src/demos/GL/demograph/
  426.           Removed -lmalloc since mallopt is not called [2]
  427.  
  428.  
  429.    * toolbox/src/demos/GL/flight/
  430.           Removed -lmalloc since mallopt is not called [2]
  431.  
  432.  
  433.    * toolbox/src/demos/GL/libdemo/
  434.           Updated percentDone.c++ to the IRIX 6.2 version in the engineering
  435.           src tree
  436.  
  437.    * toolbox/src/demos/audio/bz/
  438.           Removed -lmalloc since mallopt is not called [2]
  439.           Removed redundant -lc from load-link line
  440.  
  441.  
  442.    * toolbox/src/demos/OpenGL/insect/
  443.           Moved src/demos/OpenGL/libtk into insect as this is the only ogl
  444.           demo still using it (everything else is converted to libglut now
  445.           or straight ogl libs). Deleted the U__EXTENSIONS__ def from
  446.           libtk's Makefile.
  447.  
  448.  
  449.    * toolbox/src/demos/OpenGL/space/
  450.    * toolbox/src/exampleCode/GLX/cutNpaste/Motif+Xt/
  451.    * toolbox/src/exampleCode/GLX/dualhead/
  452.    * toolbox/src/exampleCode/GLX/rubberband/
  453.    * toolbox/src/exampleCode/GLX/texvol/
  454.           Removed -lmalloc since mallopt is not called [2]
  455.  
  456.  
  457.    * toolbox/src/exampleCode/MP/timer/highres/ 
  458.           Replaced 
  459.  
  460. #include <sys/IP5.h> 
  461.  
  462.        with 
  463.  
  464. #include <sys/clover2.h> 
  465.  
  466.  
  467.    * toolbox/src/exampleCode/SciTex/examples/phong/
  468.           Removed -lmalloc since mallopt is not called [2]
  469.           Removed -lfm -lsphere since "not used for resolving any symbol"
  470.  
  471.  
  472.    * toolbox/src/exampleCode/audio/DAT/
  473.           cdtodat.c and dodat.c:
  474.           strncmp() was being used without a third (size) args;
  475.           thus changed strncmp() to strcmp()
  476.           representative error was:
  477.  
  478. cfe: Error: cdtodat.c, line 589: The number of arguments doesn't agree with the
  479. number in the declaration.
  480.      if (argc == 2 && !strncmp(argv[1],"-q")) {
  481.  -----------------------------^
  482.  
  483.  
  484.    * toolbox/src/exampleCode/audio/somePlayback/
  485.           Removed -lmalloc since mallopt is not called [2]
  486.  
  487.  
  488.    * toolbox/src/exampleCode/audio/sonic/ [5]
  489.           Many loader errors of the following kind:
  490.  
  491. ld: ERROR 33: Unresolved text symbol "endqstrip" -- 1st referenced by //usr/lib/libsphere.a(sphere.o).
  492.  
  493.           solution was to move libsphere in front of libgl in the Makefile
  494.  
  495.  
  496.    * toolbox/src/exampleCode/games/IndiZone/blix/
  497.           Changed {blixscore_io.c,blixscore.c,blixmenu.c,blix.c} -- which
  498.           all used an explicit prototype definition at the top of each file,
  499.  
  500. int sginap(long);
  501.  
  502.           that is not required, and in fact erroneous, in irix 6.2.
  503.           Representative error was:
  504.  
  505. redeclaration of 'sginap'; previous declaration at line 427 in file '//usr/include/unistd.h'
  506.  
  507.  
  508.    * toolbox/src/exampleCode/games/IndiZone/sw/
  509.           Changed 2 lines in main() in serv_comm.c++
  510.  
  511. signal(SIGINT, terminate_server);       // let user kill server
  512. signal(SIGTERM, terminate_server);      // let user kill server
  513.  
  514.           to be
  515.  
  516. signal(SIGINT, (SIG_PF)terminate_server);       // let user kill server
  517. signal(SIGTERM, (SIG_PF)terminate_server);      // let user kill server
  518.  
  519.           Explanation:
  520.           /usr/include/sys/signal.h which signal.h has:
  521.  
  522.  
  523. #ifndef __sigret_t
  524. #define __sigret_t      void
  525. #endif
  526. typedef __sigret_t      (*SIG_PF) (__sigargs);
  527.  
  528.           -- this magic enables the casting of terminate_server to be the
  529.           correct type.
  530.           ALSO, changed sound.c++ where the last two args of
  531.  
  532. AFgetsampfmt(f, AF_DEFAULT_TRACK, &fmt, &width)
  533.  
  534.      were being defined as int and have now been changed to be long.
  535.  
  536. * toolbox/src/exampleCode/i18n/
  537.  
  538.      Removed libw.a and libgen.a from the Makefile -- the full functionality
  539.      is now in libc
  540.  
  541. * toolbox/src/exampleCode/inventor/noodle/
  542.  
  543.      MANY different kinds of errors were being generated revolving around
  544.      incompatibilities between int <--> long which no longer just produces
  545.      warnings (e.g., '"SoMFInt32 *" cannot be used to initialize an entity
  546.      of type "SoMFLong *"'). Solution was that we changed
  547.      {GeneralizedCylinder.c++,LineManipHilight.c++,Triangulator.{c++,h}}:
  548.  
  549.           SoMFLong --> SoMFInt32
  550.           int long ... --> int32_t ...
  551.           long --> int32_t
  552.  
  553.      and added:
  554.  
  555. #include "<Inventor/fields/SoMFInt32.h>"
  556.  
  557.  
  558.    * toolbox/src/exampleCode/inventor/soundspheres/
  559.           deleted the following libs --
  560.           -lgutil -lfm -limage -lgl -lmpc
  561.           -- no longer used, and replaced mismatched ints with longs
  562.  
  563.  
  564.    * toolbox/src/exampleCode/movies/cineswipe/ [3]
  565.           Added
  566.  
  567. #include <errno.h>
  568.  
  569.           to libcineswipe/cosmo_capture.c
  570.           ALSO fixed an old bug in cineui/cineui.c++
  571.           -- from the author: "only a bug in the sense that i intended it to
  572.           save in one compression format but accidentally forgot to
  573.           initialize that to be the default so it instead set it to that
  574.           movie lib internal format (which is currently unsupported in 6.2).
  575.           Actually this is better now since it's doing what i first
  576.           intended." added 3 new lines add starting at line 201:
  577.  
  578. controls->outType = outputInfo[0].type;
  579. strcpy(controls->movieParms.compType, outputInfo[0].comptype);
  580. controls->movieParms.mvFileFormat = outputInfo[0].filetype;
  581.  
  582.  
  583.    * toolbox/src/exampleCode/networking/HIPPI/
  584.           Added
  585.  
  586. #include <time.h>
  587.  
  588.           to blast.c to resolve the error of "'CLK_TCK' undefined"
  589.  
  590.  
  591.    * toolbox/src/exampleCode/networking/rpcdemo/
  592.           rm_svcproc.c was generating errors of "'_PAGESZ' undefined"
  593.           centering around the prior use of ctob(). The fix was that the
  594.           ctob() macro converts "clicks" to bytes but since a "click" is a
  595.           page the getpagesize() routine is the way to do it.
  596.           also deleted librpcsvc -- apparently all its functionality is now
  597.           incorporated inside libc.
  598.  
  599.  
  600.    * toolbox/src/exampleCode/opengl/2Dwrap/ogl/ [5]
  601.           Moved -lGLw to the beginning of the LLDLIBS line to resolve errors
  602.           of the kind:
  603.  
  604. ld: ERROR 33: Unresolved text symbol "glXChooseVisual" -- 1st referenced by //usr/lib/libGLw.a(GLwMDrawA.o).
  605.  
  606.  
  607.    * toolbox/src/exampleCode/opengl/GLUT/test/
  608.           Added -lm at the end of the Makefile's LLDLIBS line [1]
  609.  
  610.  
  611.    * toolbox/src/exampleCode/opengl/cap/ [5]
  612.           Moved -lGLw to the beginning of the LLDLIBS line to resolve errors
  613.           of the kind:
  614.  
  615. ld: ERROR 33: Unresolved text symbol "XtWidgetToApplicationContext" -- 1st referenced by //usr/lib/libGLw.a(GLwMDrawA.o).
  616.  
  617.  
  618.    * toolbox/src/exampleCode/opengl/colorChooser/ [5]
  619.           Moved -lGLw to the beginning of the LLDLIBS line to resolve errors
  620.           of the kind:
  621.  
  622. ld: ERROR 33: Unresolved text symbol "XCreateColormap" -- 1st referenced by //usr/lib/libGLw.a(GLwMDrawA.o).
  623.  
  624.  
  625.    * toolbox/src/exampleCode/opengl/defrasterPort/ [5]
  626.           Moved -lGLw to the beginning of the LLDLIBS line to resolve errors
  627.           of the kind:
  628.  
  629. ld: ERROR 33: Unresolved text symbol "glXChooseVisual" -- 1st referenced by /usr/lib/libGLw.a(GLwMDrawA.o).
  630.  
  631.  
  632.    * toolbox/src/exampleCode/opengl/glx/
  633.           Removed libXnmbx.a and libXmu.so -- no-longer needed and moved
  634.           util.o to immediately follow the program files themselves on the
  635.           load/link line.
  636.  
  637.  
  638.    * toolbox/src/exampleCode/opengl/lmwrap/igl/
  639.           Removed -lmalloc (since mallopt is not called) [2], and moved
  640.           -lsphere in front of -lgl to resolve the raft of errors [5] of the
  641.           kind,
  642.  
  643. ld: ERROR 33: Unresolved text symbol "translate" -- 1st referenced by //usr/lib/libsphere.a(sphere.o).
  644.  
  645.  
  646.    * toolbox/src/exampleCode/opengl/lmwrap/igl/
  647.           Removed -lmalloc (since mallopt is not called) [2], and moved
  648.           -lGLw in front of -lGL to resolve errors [5] of the kind,
  649.  
  650. ld: ERROR 33: Unresolved text symbol "glXChooseVisual" -- 1st referenced by //usr/lib/libGLw.a(GLwMDrawA.o).
  651.  
  652.  
  653.    * toolbox/src/exampleCode/opengl/motif/
  654.           Removed the U__EXTENSIONS__ def from the Makefile to resolve the
  655.           errors,
  656.  
  657. cfe: Error: //usr/include/stdlib.h, line 235: Syntax Error
  658.  extern void swab(const void *, void *, ssize_t);
  659.  ---------------------------------------^
  660.  
  661.           Removed -lSgm and moved -lGLw to the front of drawWidget's
  662.           load-link line and removed -lGLw from textfun's load-link line
  663.  
  664.  
  665.    * toolbox/src/exampleCode/opengl/render2pixmap/
  666.           Removed libXnmbx.a and libXmu.so as they are no longer used to
  667.           resolve any symbols; moved util.o to the beginning of the LLDLIBS
  668.           to resolve the rafts of errors [5] of the kind,
  669.  
  670. ld: ERROR 33: Unresolved text symbol "XOpenDisplay" -- 1st referenced by util.o.
  671.  
  672.  
  673.    * toolbox/src/exampleCode/opengl/x+opengl/
  674.           Had to remove the renderboth.c file/program which uses the now
  675.           obsolete double-buffering calls from libXnmbx.a which, we learned,
  676.           is now replaced by the new X Consortium standard again, DBE(3X11)
  677.           (double-buffering extension). The DBE man page is in the
  678.           x_dev.man.mandev subsystem. As was told to the janitor by one of
  679.           the X gauds in engineering,
  680.                . . . you should use the new X Consortium standard, DBE.
  681.                However, there is still no official replacement for the NMBX
  682.                calls dealing with queries for framebuffer capabilities,
  683.                which is why there still is an NMBX library shipped. This is
  684.                discussed in the x_dev release notes (although the part about
  685.                framebuffer capabilities still being supported could have
  686.                been made clearer).
  687.  
  688.  
  689.    * toolbox/src/exampleCode/stereo/opengl/
  690.           removed -lSgt and -lgutil from Makefile -- both are no longer
  691.           needed/used
  692.  
  693.  
  694.    * toolbox/src/haeberli/ibrowse/ [3]
  695.           Added
  696.  
  697. #include <errno.h>
  698.  
  699.           to ibrowse.c
  700.  
  701.  
  702.    * toolbox/src/haeberli/imgtools/ [1]
  703.           Added -lm to Makefile compile rules for iv and tosgi
  704.  
  705.  
  706.    * toolbox/src/tutorials/custEducation/openInventor/
  707.           Replaced the index[4] array type declaration in
  708.           text/fancyText3.c++ from long to int. Error generated was,
  709.  
  710. "fancyText3.c++", line 83: error(3346): function
  711.           "SoMFInt32::setValues(int, int, const long *)" is inaccessible
  712.         lp->index.setValues(0, 4, index);
  713.  
  714.  
  715.  
  716. DELETED:
  717. -----------------------------------------------------------
  718.  
  719.    * toolbox/bin/games/blackbox/
  720.           We were not able to successfully recompile this and were unable to
  721.           contact the author to see if he has already ported it to IRIX 6.2
  722.  
  723.  
  724.    * toolbox/src/exampleCode/X/motif/
  725.           Removed this subtree for the present -- the only thing in it was 
  726.       the overlays example subdir.  Its author was too backed-up to 
  727.       revamp it now but hopes to be able to get back to this this fall.
  728.  
  729.  
  730.    * toolbox/src/exampleCode/opengl/samples/
  731.           Removed this subtree as this is now part of the gl_dev.sw.samples
  732.           subsystem in irix6.2 and, although we would have liked to have
  733.           included these in the this version of the toolbox as well, we did
  734.           not have the time to do so.
  735.  
  736.  
  737.  
  738. INCLUDED BUT NOT PORTED TO IRIX 6.2:
  739. -----------------------------------------------------------
  740. (we still include the src for people on IRIX 5, as well as the possibility
  741. of more collaboration between the janitor and all of you [4].)
  742.  
  743.    * toolbox/hardware/rap/
  744.           Currently the RAP driver is not ported for IRIX 6.2 (64-bit int
  745.           size) so we were not able to include a compiled version in this
  746.           release. The error returned was,
  747.  
  748. cfe: Error: //usr/include/sys/sbd.h, line 80: Syntax Error
  749.  <<BOMB -- need define for unanticipated page size >>
  750.  
  751.  
  752.    * toolbox/src/demos/GL/buttonfly/
  753.           We were unsuccessful in recompiling buttonfly on IRIX 6.2 with the
  754.           -fullwarn option.
  755.  
  756.           Without -fullwarn this program does compile, however although we
  757.           are only working with o32 at the current time, we are committed to
  758.           performing all the code checking we can to "smoke out" and
  759.           identify the "worst offenders". In this sort of context, buttonfly
  760.           fails and we are including it as such in the "INCLUDED BUT NOT
  761.           PORTED TO IRIX 6.2" category.
  762.  
  763.  
  764.    * toolbox/src/exampleCode/inventor/DirectManipRevoSurf/
  765.           From the author who was time-strapped:
  766.                RevoSurfEngine dso doesn't load so the program is essentially
  767.                useless. I think it has to do with how the .so file is being
  768.                made. I'm using ld instead of CC or something but I don't
  769.                know the solution.
  770.           At this point, the dso is able to be compiled, but runtime fails
  771.           with:
  772.  
  773. % setenv LD_LIBRARY_PATH .
  774. % ivview -q test.iv
  775. Inventor read error: Unknown class "RevoSurfEngine"
  776.         Occurred at line  74 in ./test.iv
  777.  
  778.  
  779.    * toolbox/src/exampleCode/opengl/GLR/glrduck/
  780.       The IRIX 6.2 GLR library is not available at this time. 
  781.       We hope to have inst images available with the v6.2 DT releasing at
  782.       the end of this calendar year.  Please stay tuned to the location:
  783.            https://www.sgi.com/toolbox/src/exampleCode/opengl/GLR/ 
  784.           Once we have the software onboard, we'll indicate its presence and 
  785.       location on this page.
  786.  
  787.  
  788.    * toolbox/src/exampleCode/opengl/GLUT/progs/fortran/
  789.           This one was very strange: we were seeing boatloads of errors
  790.           throughout this directory attempting to compile with libfGL.a
  791.           (since all the OpenGL Fortran programs in the DT live here) of the
  792.           form,
  793.  
  794. ld: ERROR 33: Unresolved data symbol "glBindTexture" -- 1st referenced by /usr/lib/libfGL.a(libfogl32.o).
  795.  
  796.           These unresolved symbols are OpenGL 1.1 entry points, and we don't
  797.           support 1.1 yet. It turns out that libfGL.a has 1.1 bindings, and
  798.           all wrappers are in a single object file. The ramification is that
  799.           calling any fGL routine pulls in wrappers for all entry points,
  800.           including the the 1.1 versions of the extensions. Thus, any
  801.           program which links with libfGL.a will have the unresolved symbols
  802.           you encountered.
  803.           There are two possible workarounds to this problem.
  804.             1. If you add "-Wl,-U" to the link line (or just "-U" if you
  805.                invoke ld directly) you will get an executable. You then must
  806.                     setenv _RLD_ARGS -ignore_unresolved
  807.                to run the executable.
  808.             2. You can create a stubs file to resolve the missing entry
  809.                points. They will (should) never be called, so all it does is
  810.                make the linker happy.
  811.           For the present, we include the source for people still running
  812.           IRIX 5, but for those with IRIX 6, you will have to resort to one
  813.           of the above hacks if you want to attempt compiles on OpenGL using
  814.           fortran.
  815.  
  816.  
  817.    * toolbox/src/exampleCode/opengl/oat/src/
  818.           The janitor is not well-versed in C++ nor Inventor and the author
  819.           of oat was unavailable, so while this program's source is still
  820.           included, there is no binary.
  821.  
  822.  
  823.    * toolbox/src/exampleCode/speech/
  824.           The speech software hit a roadblock in IRIX 6. It is with regret
  825.           that at the current time resources in engineering are so tight
  826.           that the speech project is currently on hold while the engineer
  827.           who was dedicated to speech development has been pulled off onto
  828.           another project. If this impasse impacts your own development,
  829.           please send email, describing your concerns and your interest in
  830.           resuscitating the speech project's software in the IRIX 6 ocean,
  831.           to DTjanitor@sgi.com", and we will pass all such correspondence on
  832.           to the powers-that-be in software engineering who are responsible
  833.           for such decisions.
  834.  
  835.  
  836.    * toolbox/src/swtools/libdmalloc/
  837.           The author of libdmalloc was unavailable, so while this program's
  838.           source is still included, there are no .a archives or .so dsos
  839.           included.
  840.  
  841.  
  842.  
  843. NOTES:
  844. -----------------------------------------------------------
  845.  
  846.   1. While the math library used to be automatically included whenever -lgl
  847.      or -lX11 was invoked, that is no longer the case in irix 6.2. Now -lm
  848.      must be explicitly included wherever math functions are employed.
  849.  
  850.   2. The explicit use of libmalloc rather than the malloc inside libc now
  851.      produces rafts of errors of the order:
  852.  
  853. ld: WARNING 85: definition of realloc in //lib/libmalloc.so preempts that definition in //usr/lib/libc.so.
  854.  
  855.      A question the janitor had was,
  856.           is there any "general rule" to follow re: if program is using an
  857.           explicit -lmalloc in the LLDLIBS definition in the Makefile, is it
  858.           now "acceptable"/"proper"/"advisable" to get rid of said explicit
  859.           definition in 6.2 and give same unto libc?
  860.      and answers included,
  861.         o In general people are finding (as of IRIX 5.3) that libc's malloc
  862.           is as good or better than libmalloc. So which is better depends on
  863.           your application. Unless the app calls mallopt, you can probably
  864.           just drop -lmalloc.
  865.         o The libc malloc is the general ANSI malloc routines. libmalloc.so
  866.           is higher performance vendor specific malloc routines. (At least
  867.           in our case they are SGI specific).
  868.         o At least for most cases, it has been advisable to remove libmalloc
  869.           since 5.3.
  870.           Does this mean libc memory allocation routines are the same as
  871.           those in libmalloc under 6.2? (This was never the case before.)
  872.           Not the same, but much improved over the 4.x versions. Either the
  873.           SVR4 code was better, or we fixed it locally to improve
  874.           performance in general. I remember some horror stories about the
  875.           4.x malloc, especially related to motif. In 5.3 people found it
  876.           went the other way - libc malloc was usually "better" than
  877.           libmalloc. Again, YMMV.
  878.  
  879.   3. In order for all Image Library programs on the toolbox to successfully
  880.      compile on IRIX 6.2, one MUST BE SURE one is using the 2.5.1 version of
  881.      the il_eoe and il_dev products. Attempting to use the 3.0 versions of
  882.      the Image Libraries will not work as the janitor discovered. 2.5.1 is
  883.      THE version of the IL that is compatible with and intended for irix
  884.      6.2.
  885.  
  886.   4. Pursuing our goal of extending collaboration between the DTjanitor and
  887.      everyone in the Developer Program, while we were not able to
  888.      port/successfully recompile these programs to/on IRIX 6.2, we
  889.      nevertheless include their source so that, if anyone of you has the
  890.      saavy, and finds the inclination/motivation enabling you to succeed in
  891.      reviving these programs, PLEEZE send us whatever files (source,
  892.      Makefile, etc.) you modify to "make it go" again, and we will add these
  893.      back into the v6.2 DT release as working-again src+binaries.
  894.  
  895.   5. Artifact of the "one-pass linker" produces errors of the form:
  896.           ld: ERROR 33: Unresolved text symbol .....
  897.      using the example of src/exampleCode/audio/sonic/ above,
  898.           since libsphere makes function calls which are resolved by libgl,
  899.           you need to switch the order of those two libs on the link line.
  900.           This is an artifact of the "one-pass linker": since the symbols
  901.           are 1st referenced by libsphere, they were not resolved when the
  902.           linker processed libgl, where the symbols are defined but not
  903.           referenced.
  904.  
  905.